/*
 *接口编写处...
*如果接口需要做Action的权限验证，请在Action上使用属性
*如: [ApiActionPermission("base_defectitem",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Entity.DomainModels;
using MES.BasicData.IServices;
using Microsoft.AspNetCore.Authorization;
using VOL.Core.DBManager;
using VOL.Entity.DomainModels.Print;

namespace MES.BasicData.Controllers
{
    public partial class base_defectitemController
    {
        private readonly Ibase_defectitemService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;

        [ActivatorUtilitiesConstructor]
        public base_defectitemController(
            Ibase_defectitemService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }

        /// <summary>
        /// 获取首页工序数量明细信息
        /// </summary>
        /// <returns></returns>
        [Route("getAppHomeDefectValue"), HttpGet]
        [AllowAnonymous]
        public JsonResult GetAppHomeDefectValue()
        {
            string woSql = " select * from homeview_app_getdefectvalue ";
            List<BoardEntity> list = DBServerProvider.SqlDapper.QueryList<BoardEntity>(woSql, new { });
            return JsonNormal(list);
        }
    }
}
